﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.VisualStudio.TeamArchitect.PowerTools.Ultimate.Features;
using Microsoft.VisualStudio.TemplateWizard;

namespace YasharEl.Infrastructure.ArchitectureTools.AppModelerLib.Wizards
{
    public class BasicWizardChildTemplateExtension : IWizard
    {

        #region IWizard Members

        public void BeforeOpeningFile(EnvDTE.ProjectItem projectItem)
        {
        }

        public void ProjectFinishedGenerating(EnvDTE.Project project)
        {
        }

        public void ProjectItemFinishedGenerating(EnvDTE.ProjectItem projectItem)
        {
        }

        public void RunFinished()
        {
        }

        public void RunStarted(object automationObject, Dictionary<string, string> replacementsDictionary, WizardRunKind runKind, object[] customParams)
        {
            foreach (var item in BasicWizardTemplateExtension.GlobalReplacementsDictionary)
            {
                if (!replacementsDictionary.ContainsKey(item.Key))
                {
                    replacementsDictionary.Add(item.Key, item.Value);
                }
            }
        }

        public bool ShouldAddProjectItem(string filePath)
        {
            return true;
        }

        #endregion
    }
}
